# Maintainer: BlackEagle <ike.devolder@gmail.com>>

pkgname=kodi-addon-screensaver-biogenesis
epoch=1
pkgver=20.1.0
_codename=Nexus
pkgrel=5
pkgdesc="BioGenesis screensaver for Kodi"
arch=('loong64' 'x86_64')
url='https://github.com/xbmc/screensaver.biogenesis'
license=('GPL')
groups=('kodi-addons' 'kodi-addons-screensaver')
makedepends=('cmake' 'kodi-dev')
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/screensaver.biogenesis/archive/$pkgver-$_codename.tar.gz")
sha512sums=('2f216d35eabe76484f79f99d50ce221cc80dd2783ec269bb245dd0e66fb81448de44ea44bd575dd00222933e7643c1a482ecf2c527fc9c32bac4b78ff0948f05')

build() {
    cd "screensaver.biogenesis-$pkgver-$_codename"
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DUSE_LTO=1 \
        .
    make
}

package() {
    depends=('kodi')
    cd "screensaver.biogenesis-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
}

